<back-to-top class="back_top" title="返回顶部"></back-to-top>
<div class="tab-pane fade in active" >
    <div class="row">
    	<div class="col-md-8">
             <p style="color:#FFC107">
                由于部分源码版本原因下载地址可能延后（12小时内）提供，对此我们深感歉意！
            </p>
            <div class="btn-group" role="group">
                <button type="button" ng-click="search='1'" class="btn btn-15 btn-success">已购买</button>
                <button type="button" ng-click="search='0'" class="btn btn-15 btn-default">未支付</button>
            </div>
    		<table class="table">
                <tr class="me-tab-2-title">
                    <td>订单号</td>
                    <td>物品</td>
                    <td>价格</td>
                    <td>日期</td>
                    <td>下载</td>
                </tr>

                <tr ng-repeat="order in list | filter:{status:search}">
                    <td>{{order.orderid}}</td>
                    <td>{{order.post.name}}</td>
                    <td>￥{{order.payAmount}}</td>
                    <td>{{order.created | date:"yyyy/MM/dd"}}</td>
                    <td ng-if="order.status=='1'">
                        <button ng-click="download(order.orderid, order.post.filename)" class="btn btn-primary">下载</button>
                        <button ng-click="openModal(order.orderid, order.pid)"  class="btn btn-info" 
                        ng-show="order.cStatus=='0'"
                        data-toggle="modal" data-target="#myModal">评价</button>
                    </td>
                    <td ng-if="order.status=='0'">
                        <button class="btn btn-primary" ui-sref="order({orderid:order.orderid})">继续付款</button>
                        <i class="glyphicon glyphicon-trash" 
                        ng-click="delete(order.orderid)"
                        data-toggle="modal" data-target="#canceld"></i>
                    </td>
                </tr>
            </table>
    	</div>
    	<div class="col-md-4">
            <div class="alert alert-info" role="alert">
                <br><h4>请立即下载</h4>
                <p>您可以立即下载您的购买物品，因为可能会不时更新版本源码</p>
            </div>
            <div class="alert alert-info" role="alert">
                <br><h4>购买须知</h4>
                <p>您有权使用该项目为您自己或一个客户端（“单一应用程序”）创建一个单一的终端产品，并且最终产品可以免费分发。</p>
                <p>我们鼓励使用者原创或二次创新的作品投入到小白鲸网站，来为你带来额外的经济收益</p>
            </div>
            <div class="alert alert-info" role="alert">
                <br><h4>下载中出现问题？</h4>
                <p>如果您在下载中遇到“损坏”或“丢失文件”问题，我们建议以下步骤：</p>
                <p>1.检查您的连接，然后尝试重新下载您的购买。损坏或丢失的文件可能是中断或不完整的下载的结果。</p>   
                <p>2.使用其他实用程序来解压缩您的购买文件。</p>    
                <p>3.联系我们支持，反馈您的所有的问题细节。</p>
            </div>
    	</div>
    </div>
</div>


<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-6">星级评分</div>
                    <div class="col-md-6">
                        <select ng-model="comment.score">
                            <option value="1">一星</option>
                            <option value="2" selected>二星</option>
                            <option value="3">三星</option>
                            <option value="4">四星</option>
                            <option value="5">五星</option>
                        </select>
                    </div>
                    <div class="col-md-12 content">
                       <input type="text" maxlength="100" class="form-control" 
                        ng-model="comment.content"
                        placeholder="请输入你要评价的内容"> 
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" ng-click="reply()">提交</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!-- 模态框（Modal） -->
<div class="modal fade" id="canceld" tabindex="-1" role="dialog" aria-labelledby="cancelLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body" style="text-align: center;">
                是否取消订单？
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" ng-click="deleteOk()">确定</button>
            </div>
        </div>
    </div>
</div>


<style>
    .alert h4{
        font-weight: bold;
        color: #000;
    }
    .glyphicon-trash{
        color: #F44336;
    }
    .table{
        font-size: 16px;
    }
    .length{
        width: 120px;
    }
    .col-md-4 p{
        font-size: 14px;
    }
    .content{
        padding-top: 20px;
    }
    .form-control{
        height: 60px;
    }
    .col-md-6{
        margin-top: 20px;
        font-size: 15px;
    }
    .col-md-6 select{
        width: 200px;
        height: 30px;
    }

</style>
